package benchmarks.tpch.mongo.domain;

import java.util.Date;

public class Orders extends TPCHDomain<Integer>
{
//    TPCHLoaderMySQL.CastTypes.LONG,   // o_orderkey
//    TPCHLoaderMySQL.CastTypes.LONG,   // o_custkey
//    TPCHLoaderMySQL.CastTypes.STRING, // o_orderstatus
//    TPCHLoaderMySQL.CastTypes.DOUBLE, // o_totalprice
//    TPCHLoaderMySQL.CastTypes.DATE,   // o_orderdate
//    TPCHLoaderMySQL.CastTypes.STRING, // o_orderpriority
//    TPCHLoaderMySQL.CastTypes.STRING, // o_clerk
//    TPCHLoaderMySQL.CastTypes.LONG,   // o_shippriority
//    TPCHLoaderMySQL.CastTypes.STRING  // o_comment
    private int o_orderkey; //1 //primary
    private int o_custkey; //2
    private String o_orderstatus; //3
    private double o_totalprice; //4
    private Date o_orderdate; //5
    private String o_orderpriority; //6
    private String o_clerk; //7
    private int o_shippriority; //8
    private String o_comment; //9

    @Override
    public void setInt(int pos, int value) {
        if (pos == 1) {
            o_orderkey = value;
        }
        else if (pos == 2) {
            o_custkey = value;
        }
        else if (pos == 8) {
            o_shippriority = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDouble(int pos, double value) {
        if (pos == 4) {
            o_totalprice = value;
        }
        else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setString(int pos, String value) {
        if (pos == 3) {
            o_orderstatus = value;
        }
        else if (pos == 6) {
            o_orderpriority = value;
        }
        else if (pos == 7) {
            o_clerk = value;
        }
        else if (pos == 9) {
            o_comment = value;
        }
        else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDate(int pos, Date value) {
        if (pos == 5) {
            o_orderdate = value;
        }
        else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public Integer getPrimaryKey() {
        return o_orderkey;
    }

    public int getO_orderkey() {
        return o_orderkey;
    }

    public void setO_orderkey(int o_orderkey) {
        this.o_orderkey = o_orderkey;
    }

    public int getO_custkey() {
        return o_custkey;
    }

    public void setO_custkey(int o_custkey) {
        this.o_custkey = o_custkey;
    }

    public String getO_orderstatus() {
        return o_orderstatus;
    }

    public void setO_orderstatus(String o_orderstatus) {
        this.o_orderstatus = o_orderstatus;
    }

    public double getO_totalprice() {
        return o_totalprice;
    }

    public void setO_totalprice(double o_totalprice) {
        this.o_totalprice = o_totalprice;
    }

    public Date getO_orderdate() {
        return o_orderdate;
    }

    public void setO_orderdate(Date o_orderdate) {
        this.o_orderdate = o_orderdate;
    }

    public String getO_orderpriority() {
        return o_orderpriority;
    }

    public void setO_orderpriority(String o_orderpriority) {
        this.o_orderpriority = o_orderpriority;
    }

    public String getO_clerk() {
        return o_clerk;
    }

    public void setO_clerk(String o_clerk) {
        this.o_clerk = o_clerk;
    }

    public int getO_shippriority() {
        return o_shippriority;
    }

    public void setO_shippriority(int o_shippriority) {
        this.o_shippriority = o_shippriority;
    }

    public String getO_comment() {
        return o_comment;
    }

    public void setO_comment(String o_comment) {
        this.o_comment = o_comment;
    }
}
